﻿<local:DocumentBase x:Class="WPFExcelReport.JLTCAD2ITX"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                    xmlns:db="clr-namespace:INTEX.DataBase"  
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"
                     xmlns:WT="clr-namespace:WPFExcelReport;assembly=TWTSAER"  
                    Loaded="Window_Loaded"  
                    Background="White"    
                    >
    <local:DocumentBase.Resources>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:String2ColorConverter  x:Key="str2color"/>
        <db:SETINTEXDB  x:Key="Set4ITX" />
        <db:SETINTEXDB  x:Key="SetData" />
        <CollectionViewSource  x:Key="vwTechMaster" Source="{Binding Path=TechMaster,Source={StaticResource Set4ITX}}"/>
        <CollectionViewSource  x:Key="vwTechDetail" Source="{Binding Path=TechDetail,Source={StaticResource Set4ITX}}"/>
        <CollectionViewSource  x:Key="vwLogInfo" Source="{Binding Path=LOGINFO,Source={StaticResource SetData}}"/>
    </local:DocumentBase.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
        </Grid.RowDefinitions> 
        <WrapPanel Grid.Row="1"  >
            <Button Name="btnLogInfor" Click="btnLogInfor_Click" Height="40" Width="40">
                <Button.Background>
                    <ImageBrush  ImageSource="Images/Search.png" />
                </Button.Background>
            </Button>
            <WrapPanel>
                <Button Name="btnAutoRun" Click="btnAutoRun_Click" Height="40" Width="40" >
                    <Button.Background>
                        <ImageBrush  ImageSource="Images/Reload.png" />
                    </Button.Background>
                </Button>
                <TextBlock>自动</TextBlock>
            </WrapPanel>
            <TextBox Name="IsRun"  Width="30">Y</TextBox>
            <WrapPanel>
                <Button Name="btnStopRun" Click="btnStopRun_Click" Height="40" Width="40" >
                    <Button.Background>
                        <ImageBrush  ImageSource="Images/Delete.png" />
                    </Button.Background>
                </Button>
                <TextBlock>停止</TextBlock>
            </WrapPanel>
            <TextBox Name="txtFInterID" Width="90"></TextBox>
            <Label   Content="小花号:" Width="Auto" Margin="0" HorizontalAlignment="Left" FontSize="18" VerticalAlignment="Center" />
            <TextBox  Name="txtCADART" 
                                                                  MaxLength="20" Width="150" Margin="10,0,0,0"  HorizontalAlignment="Left" Background="Pink" FontSize="18" AcceptsTab="True" CharacterCasing="Upper" 
                                                                  />
            <TextBlock>同步色号</TextBlock>
            <Button   Click="btnColorSame_Click" Height="40" Width="40">
                <Button.Background>
                    <ImageBrush  ImageSource="Images/Compact Disk.png" />
                </Button.Background>
            </Button>
        </WrapPanel>
        <Grid Grid.Row="2">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"></RowDefinition>
                <RowDefinition Height="1*"></RowDefinition>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition  Width="1*" />
                <ColumnDefinition  Width="1*" />
            </Grid.ColumnDefinitions> 
            <DataGrid  Grid.Row="0" Grid.RowSpan="2"  Grid.Column="0"  
                       ItemsSource="{Binding Source={StaticResource ResourceKey=vwLogInfo}}"  
                       AutoGenerateColumns="False" EnableRowVirtualization="True"
                       VerticalScrollBarVisibility="Auto"
                       HorizontalScrollBarVisibility="Auto"
                       VerticalAlignment="Stretch"
                       HeadersVisibility="Column" 
                       FontSize="18"
                       HorizontalAlignment="Stretch"
                        EnableColumnVirtualization="True">
                <DataGrid.Columns>
                    <DataGridTextColumn Binding="{Binding Path=FCLOTHNO}" Header="FClothNO" Width="Auto" MinWidth="100" />
                    <DataGridTextColumn Binding="{Binding Path=FCOLORNO}" Header="FColorNO" Width="Auto" MinWidth="40" />
                    <DataGridTextColumn Binding="{Binding Path=FDESIGNNAME}" Header="FDesignName" Width="Auto" MinWidth="40" />
                    <DataGridTextColumn Binding="{Binding Path=FEDITDATE}" Header="FEditDate" Width="Auto" MinWidth="80" />
                </DataGrid.Columns>
            </DataGrid>
            <DataGrid  Grid.Row="0" Grid.Column="1"
                    x:Name="dlgCADTechMaster"
                           ItemsSource="{Binding Source={StaticResource ResourceKey=vwTechMaster}}"  
                           AutoGenerateColumns="False" EnableRowVirtualization="True"
                           VerticalScrollBarVisibility="Auto"
                           HorizontalScrollBarVisibility="Auto"
                           HeadersVisibility="Column" 
                           FontSize="12"
                           MaxHeight="300"
                           Width="Auto" 
                           Height="Auto"
                           EnableColumnVirtualization="True">
                <DataGrid.Columns>
                    <DataGridTextColumn Binding="{Binding Path=FClothNO}" Header="品种" Width="Auto" MinWidth="80" />
                    <DataGridTextColumn Binding="{Binding Path=FAssortment}" Header="描述" Width="Auto" MinWidth="100" />
                    <DataGridTextColumn Binding="{Binding Path=FDesignDate}" Header="设计时间" Width="Auto" MinWidth="80" />
                </DataGrid.Columns>
            </DataGrid>
            <DataGrid  Grid.Row="1" Grid.Column="1"
                    x:Name="dlgTechDetail"
                           ItemsSource="{Binding Source={StaticResource ResourceKey=vwTechDetail}}"  
                           AutoGenerateColumns="False" EnableRowVirtualization="True"
                           VerticalScrollBarVisibility="Auto"
                           HorizontalScrollBarVisibility="Auto"
                           HeadersVisibility="Column" 
                           FontSize="12" 
                           EnableColumnVirtualization="True">
                <DataGrid.Columns>
                    <DataGridTextColumn Binding="{Binding Path=FIsWarp}" Header="FIsWarp" Width="Auto" MinWidth="80" />
                    <DataGridTextColumn Binding="{Binding Path=FCharValue}" Header="FCharValue" Width="Auto" MinWidth="20" />
                    <DataGridTextColumn Binding="{Binding Path=FThreadCode}" Header="FThreadCode" Width="Auto" MinWidth="20" />
                    <DataGridTextColumn Binding="{Binding Path=FThreadName}" Header="FThreadName" Width="Auto" MinWidth="20" />
                    <DataGridTextColumn Binding="{Binding Path=FThreadValue}" Header="FThreadValue" Width="Auto" MinWidth="20" />
                </DataGrid.Columns>
            </DataGrid> 
        </Grid>
        <Expander Grid.Row="3">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition  Width="1*" />
                    <ColumnDefinition  Width="1*" />
                </Grid.ColumnDefinitions>
                <WT:TWT15 Grid.Column="0"
                CADPATTERN="{Binding PATTERN,ElementName=TV}"/>
                <WT:TWT15 Grid.Column="1"
                    CADPATTERN="{Binding PATTERN,ElementName=TV}" />
            </Grid> 
        </Expander>
    </Grid> 
</local:DocumentBase>